package org.lisa.crm.controller.User;


import org.lisa.crm.common.util.Result;
import org.lisa.crm.model.User;
import org.lisa.crm.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by admin on 2018/1/4.
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/userLogin")
    @ResponseBody
    public Result userLogin(User user){
        Result result = userService.userLogin(user);
        return result;
    }
    /*user/queryAllCustomerManager*/
    @PostMapping("/queryAllCustomerManager")
    @ResponseBody
    public List<User> queryAllCustomerManager(){
        return userService.queryAllCustomerManager();
    }
}
